/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.edu.entity.wechat;

import com.idenger.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 微信信息Entity
 * @author 兰正军
 * @version 2017-12-04
 */
public class EduWechatUser extends DataEntity<EduWechatUser> {
	
	private static final long serialVersionUID = 1L;
	private String openid;		// 用户唯一标识
	private String nickname;		// 用户昵称
	private String sex;		// 用户性别
	private String province;		// 用户个人资料填写的省份
	private String city;		// 用户填写的城市
	private String country;		// 国家
	private String headimgurl;		// 头像
	private String issubscribe;		// 用户是否订阅该公众号  值为0标识拉取不到
	private Date subscribeTime;		// 关注时间
	private String language;		// 语言
	private String unionid;		// 标识
	private String remark;		// 备注
	private String groupid;		// 分组ID
	
	public EduWechatUser() {
		super();
	}

	public EduWechatUser(String id){
		super(id);
	}

	@Length(min=0, max=64, message="用户唯一标识长度必须介于 0 和 64 之间")
	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Length(min=0, max=64, message="用户昵称长度必须介于 0 和 64 之间")
	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
	@Length(min=0, max=10, message="用户性别长度必须介于 0 和 10 之间")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@Length(min=0, max=64, message="用户个人资料填写的省份长度必须介于 0 和 64 之间")
	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}
	
	@Length(min=0, max=64, message="用户填写的城市长度必须介于 0 和 64 之间")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	@Length(min=0, max=64, message="国家长度必须介于 0 和 64 之间")
	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}
	
	@Length(min=0, max=512, message="头像长度必须介于 0 和 512 之间")
	public String getHeadimgurl() {
		return headimgurl;
	}

	public void setHeadimgurl(String headimgurl) {
		this.headimgurl = headimgurl;
	}
	
	@Length(min=0, max=10, message="用户是否订阅该公众号  值为0标识拉取不到长度必须介于 0 和 10 之间")
	public String getIssubscribe() {
		return issubscribe;
	}

	public void setIssubscribe(String issubscribe) {
		this.issubscribe = issubscribe;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getSubscribeTime() {
		return subscribeTime;
	}

	public void setSubscribeTime(Date subscribeTime) {
		this.subscribeTime = subscribeTime;
	}
	
	@Length(min=0, max=64, message="语言长度必须介于 0 和 64 之间")
	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}
	
	@Length(min=0, max=525, message="标识长度必须介于 0 和 525 之间")
	public String getUnionid() {
		return unionid;
	}

	public void setUnionid(String unionid) {
		this.unionid = unionid;
	}
	
	@Length(min=0, max=1024, message="备注长度必须介于 0 和 1024 之间")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Length(min=0, max=64, message="分组ID长度必须介于 0 和 64 之间")
	public String getGroupid() {
		return groupid;
	}

	public void setGroupid(String groupid) {
		this.groupid = groupid;
	}
	
}